From: James Antill Date: Wed, 22 Oct 2014 05:23:49 +0000 (-0400) Subject: dump: Print the version when dumping a commit, log/show/etc. X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~1077 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=aab6e7bdf26f2a51e4d5bb9cd423443ec8748a93;p=ostree.git dump: Print the version when dumping a commit, log/show/etc. --- diff --git a/src/ostree/ot-dump.c b/src/ostree/ot-dump.c index bb1f9824..a9fb623f 100644 --- a/src/ostree/ot-dump.c +++ b/src/ostree/ot-dump.c @@ -26,6 +26,7 @@ #include "ot-dump.h" #include "otutil.h" +#include "ot-admin-functions.h" void ot_dump_variant (GVariant *variant) @@ -92,6 +93,7 @@ dump_commit (GVariant *variant, const gchar *body; guint64 timestamp; gs_free gchar *str = NULL; + gs_free gchar *version = NULL; /* See OSTREE_COMMIT_GVARIANT_FORMAT */ g_variant_get (variant, "(a{sv}aya(say)&s&stayay)", NULL, NULL, NULL, @@ -102,6 +104,11 @@ dump_commit (GVariant *variant, if (str) g_print ("Date: %s\n", str); + if ((version = ot_admin_checksum_version (variant))) + { + g_print ("Version: %s\n", version); + } + g_print ("\n"); dump_indented_lines (subject);